﻿@model IEnumerable<COP4710.Models.UserModel>
@{
    ViewBag.Title = "Index";
    ViewBag.PageTitle = "Users";
}
@using COP4710.Models;


<div id="sidebar" class="fixed">
    <a href="@Url.Action("Create")" class="Submit">New User</a>
</div>
<div class="Content">
    @foreach (UserModel item in Model)
    {
        <a href="@Url.Action("Details", new { id = item.UserName.Trim() })" style="display:block;">
            <div class="ListItem">
                <div class="left">
                    @item.FullName </div>
                <div class="right">@item.AccountType</div>
            </div>
        </a> 
    }
</div>

<script type="text/javascript">

    $(function () {

        $('.ListViewItem').each(function () {

            $parent = $(this);
            $('.Header', this).click(function () {

                $('.Detail', $parent).toggle();
            });
        });
    });
</script>
